/* eslint-disable eqeqeq */
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useState, useEffect } from "react";
import { getDetails } from "../API/feedbackAPI";
import { List } from "antd-mobile";
import Header from "../../Header";

export default function Details() {
  const id = window.localStorage.getItem("id");
  const [obj, setobj]: any = useState({});

  const onchange = async (id: any) => {
    let res = await getDetails(id);
    console.log(res.data.data);
    if (res.data.code == 200) {
      setobj(res.data.data);
    }
  };
  useEffect(() => {
    onchange(id);
  }, []);

  return (
    <>
    <Header title="反馈信息详情"></Header>
      <div className="boss xz-content">
        <List>
          <List.Item extra={obj.id}>反馈id</List.Item>
          <List.Item extra={obj.title}>反馈标题</List.Item>
          <List.Item extra={obj.createTime}>反馈时间</List.Item>
          <List.Item extra={obj.userId}>反馈人用户id</List.Item>
          <List.Item extra={obj.content}>反馈内容</List.Item>
          <List.Item extra={obj.appType}>App类型</List.Item>
        </List>
      </div>
    </>
  );
}
